import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import { connect } from '@tarojs/redux'
import { setSearchPageBack } from '../../actions/AcSearchFc'

import './searchPage.less'

@connect(({ searchFc }) => ({
  searchFc
}), (dispatch) => ({
  setSearchPageBack() {
    dispatch(setSearchPageBack())
  }
}))
class SearchPage extends Component {
  componentWillReceiveProps() {
    // console.log(this.props, nextProps)
  }

  componentWillMount() {

  }
  componentWillUnmount() { }

  componentDidShow() { }

  componentDidHide() { }

  render() {
    let { isshowSearchPage } = this.props.searchFc
    return (
      <View className='comp-searchPage' style={isshowSearchPage}>
        <View className='history'>
          <View className='history-tit'>搜索历史</View>
          <View className='history-outer'>
            <Text className='history-t'>内容1</Text>
            <Text className='history-t'>大米饭</Text>
            <Text className='history-t'>扬州炒饭</Text>
            <Text className='history-t'>牛肉面</Text>
          </View>
        </View>
        <View className='product'>
          <View className='product-tit'>搜索结果</View>
          <View className='product-outer'>
            <Text className='product-t'>内容1</Text>
            <Text className='product-t'>大米饭</Text>
            <Text className='product-t'>扬州炒饭</Text>
            <Text className='product-t'>牛肉面</Text>
          </View>
        </View>
      </View>
    )
  }
}

export default SearchPage
